package StudyCode.summary.zipfile;

import java.io.File;
import java.io.IOException;
import java.io.RandomAccessFile;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class UsingRandomAccessFile {
	public static void main(String[] args) throws Exception {
		try {
			File f = new File("E:/Copy/2.txt");
			RandomAccessFile raf = new RandomAccessFile(f, "rw");

			raf.seek(f.length());

			raf.writeChars("aString");
			raf.close();
			System.out.println("追加字符串成功");
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
